package com.knight.study.patterns.tujie.observer;

/**
 * @Author knight
 * @Date 2024/9/12 11:39
 */

public class GraphObserver implements Observer{

    @Override
    public void update(NumberGenerator generator) {
        System.out.print("GraphObserver:");
        int count = generator.getNumber();
        for (int i = 0; i < count; i++) {
            System.out.print("*");
        }
        System.out.println("");
        try {
            Thread.sleep(100);
        }catch (Exception e) {

        }
    }
}
